/* eslint-disable */
import React from 'react';

interface Props {
  error: any;
  retry: any;
  timedOut: any;
  pastDelay: any;
}

const Loading: React.FC<Props> = (props) => {
  if (props.error) {
    console.error(props.error);
    // When the loader has errored
    return <div>Error!</div>;
  } else if (props.timedOut) {
    // When the loader has taken longer than the timeout
    return <div>Taking a long time...</div>;
  } else if (props.pastDelay) {
    // When the loader has taken longer than the delay
    return null;
  } else {
    // When the loader has just started
    return null;
  }
};

export default Loading;
